xenstore: Resolve gcc4.5 type error
authorKeir Fraser <keir.fraser@citrix.com>
Sat, 6 Mar 2010 13:31:42 +0000 (13:31 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Sat, 6 Mar 2010 13:31:42 +0000 (13:31 +0000)
Without this, gcc 4.5 complains with,
error: case value '3' not in enumerated type 'const enum xs_perm_type'

Signed-off-by: Charles Arnold <carnold@novell.com>
tools/xenstore/xs_lib.c

index 45ca5df4025220610a65ad8851e8e2cae6bfd76f..03a9ee4393bb9d62d1f746b0505967ebc368c283 100644 (file)
@@ -149,7 +149,7 @@ bool xs_strings_to_perms(struct xs_permissions *perms, unsigned int num,
 bool xs_perm_to_string(const struct xs_permissions *perm,
                        char *buffer, size_t buf_len)
 {
-       switch (perm->perms) {
+       switch ((int)perm->perms) {
        case XS_PERM_WRITE:
                *buffer = 'w';
                break;